<%@ page language="java" 
	contentType="text/html; 
	charset=UTF-8"
	pageEncoding="UTF-8"
	import="connectMysql.TestConnect"
	%>
<!DOCTYPE html>
<html>
<head>
    <title>班级作业完成情况</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 20px;
        }

        h1 {
            font-size: 24px;
        }

        table {
            width: 100%;
            border-collapse: collapse;
        }

        th, td {
            padding: 10px;
            text-align: left;
            border-bottom: 1px solid #ccc;
        }

        tr:hover {
            background-color: #f5f5f5;
        }

        a {
            color: #0000EE;
            text-decoration: none;
        }

        a:hover {
            text-decoration: underline;
        }
    </style>
</head>
<body>
		<%String user_id=request.getParameter("user_id"); %>
		<%String work_id=request.getParameter("work_id"); %>
        <%String class_name=request.getParameter("class_name"); %>
    <h1>班级作业完成情况</h1>
    <h1><%=class_name %></h1>
    <table>
        <tr>
            <th>学生姓名</th>
            <th>提交时间</th>

            <th>分数</th>
            <th>评语</th>
            <th>完成情况</th>
            
        </tr>
        
        
        <%String[][] data=connectMysql.TestConnect.get_homework_list(class_name, Integer.parseInt(work_id)); %>
        <% for (int i = 0; i < data.length; i++) { %>
            <tr >
                <td><a href="judge_homework_item.jsp?user_id=<%=user_id%>&if_submit=<%=data[i][4]%>&stud_name=<%= data[i][0] %>&class_name=<%=class_name %>&work_id=<%= i+1 %>"><%= data[i][0] %></a></td>
                <td><%= data[i][1] %></td>
                <td><%= data[i][2] %></td>
                <td><%= data[i][3] %></td>
                <td><%= data[i][4] %></td>
            </tr>
        <% } %>
    </table>
</body>
</html>
